# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-anyascii
_pkgname=anyascii
pkgver=0.3.3
pkgrel=1
pkgdesc='Unicode to ASCII transliteration.'
arch=('any')
url='https://pypi.org/project/anyascii/#files'
license=('ISC')
depends=('python')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('e4ec22d50fc87117e5a426a76bbf1f9a118d10254ccdacc534da1b67f84374bdee8635ea3176ec9023ff9c38d2fde2dccb6f0c5ce66625f12815f43addba88e7')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

